package com.example.one;

import java.io.File;   
import javax.xml.bind.JAXBContext;   
import javax.xml.bind.JAXBException;   
import javax.xml.bind.Unmarshaller;   
import org.xml.sax.SAXException;   
  
public class XML2Java {   
    /**  
     * @param args  
     * @throws JAXBException   
     * @throws JAXBException   
     * @throws SAXException   
     */  
    public static void main(String[] args) throws JAXBException {   
        JAXBContext context = JAXBContext.newInstance(People.class);   
        Unmarshaller unmarshaller = context.createUnmarshaller();   
        File file = new File("src/people.xml");   
        People people = (People)unmarshaller.unmarshal(file);   
        System.out.println(people.id);   
        System.out.println(people.name);   
        System.out.println(people.age);   
    }   
}  